
#include <config.h>
#include <genericsavedialog.h>

GenericSaveDialog::GenericSaveDialog(QWidget *parent)
  : QDialog(parent)
  , _result(Result_Cancel)
{
  _gui.setupUi (this);
  setWindowTitle(CE_TOOL_NAME);
}


void GenericSaveDialog::SetSaveType(const QString &saveType)
{
  _gui.labelRename->setText ("Save " + saveType + "?");
}

void GenericSaveDialog::SetSaveMessage(const QString &saveMessage)
{
  _gui.labelMessage->setText (saveMessage);
}

void GenericSaveDialog::on_pushButtonCancel_clicked()
{
  _result = Result_Cancel;
  reject ();
}

void GenericSaveDialog::on_pushButtonSave_clicked()
{
  _result = Result_Save;
  accept();
}

void GenericSaveDialog::on_pushButtonDontSave_clicked()
{
  _result = Result_DontSave;
  accept();
}
